/obj/item/weapon/baby
	name = "Baby"
	icon = 'Baby.dmi'
	icon_state = "baby"
	gender = NEUTER

/obj/item/weapon/baby/dropped()
	..()
	var/mob/living/simple_animal/baby/B
	for(B in src)
		B.loc = src.loc
	del(src)
	return

/obj/item/weapon/baby/update_icon()
	switch(gender)
		if("female")
			icon_state = "f_baby"
		if("male")
			icon_state = "m_baby"
		else
			return

/mob/living/simple_animal/baby						//Changed path to make the baby a simple_animal.
	name = "Baby"									//Not a girl, just a baby. For now.
	icon = 'Baby.dmi'								//Changed to 'Baby.dmi'.
	icon_state = "[g]baby"								//"s, not 's.
	health = 20
	maxHealth = 20
	gender = NEUTER
	canmove = 0
	density = 0
	friendly = "touches"
	icon_living = "[g]baby"
	icon_dead = "[g]baby_dead"
	var/g = ""

/mob/living/simple_animal/baby/New()				//When a baby is made, the procs "pick_gender()" and "pick_name()" will run for the baby.
	..()
	pick_gender()

/mob/living/simple_animal/baby/proc/pick_gender()	//Picks the gender randomly. If a girl, the name is "Baby Girl" until "pick_name()" is run completely. Same with the boy.
	gender = pick("female","male")
	if(gender == "female")
		name = "Baby Girl"
		g = "f_"
	else
		name = "Baby Boy"
		g = "m_"
	update_icon()

/*
/mob/living/simple_animal/baby/proc/pick_name(mob/living/carbon/human/M as mob)		//Looks for a female human in the same square as the baby. If one is found, gives them the ability to decide the baby's name. Precious.
	for(M in view(0,src))
	if(M.gender == FEMALE)
		src.name = input(M,"Choose a name for your [src.name]!","Your Baby's Name",src.name)
	else
		return
*/

/mob/living/simple_animal/baby/attack_hand(mob/living/carbon/human/M as mob)
	switch(M.a_intent)
		if("help")
			var/obj/item/weapon/baby/B = new/obj/item/weapon/baby(M.loc)
			M.put_in_hand(B)
			src.loc = B
			B.gender = src.gender
			B.name = src.name
			B.update_icon()
	..()
	return

/mob/living/simple_animal/baby/proc/update_icon()
	switch(gender)
		if("female")
			icon_state = "[g]baby"
		if("male")
			icon_state = "[g]baby"
		else
			return